package com.charger.PromoteOperations.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

/**
 * 
 * @TableName giftcertificate_chargingstation
 */
@TableName(value ="giftcertificate_chargingstation")
public class GiftcertificateChargingstation implements Serializable {
    /**
     * 序号
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 礼券 ID
     */
    private Long giftcertificateId;

    /**
     * 充电站 ID
     */
    private Long chargingstationId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 序号
     */
    public Long getId() {
        return id;
    }

    /**
     * 序号
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 礼券 ID
     */
    public Long getGiftcertificateId() {
        return giftcertificateId;
    }

    /**
     * 礼券 ID
     */
    public void setGiftcertificateId(Long giftcertificateId) {
        this.giftcertificateId = giftcertificateId;
    }

    /**
     * 充电站 ID
     */
    public Long getChargingstationId() {
        return chargingstationId;
    }

    /**
     * 充电站 ID
     */
    public void setChargingstationId(Long chargingstationId) {
        this.chargingstationId = chargingstationId;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        GiftcertificateChargingstation other = (GiftcertificateChargingstation) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getGiftcertificateId() == null ? other.getGiftcertificateId() == null : this.getGiftcertificateId().equals(other.getGiftcertificateId()))
            && (this.getChargingstationId() == null ? other.getChargingstationId() == null : this.getChargingstationId().equals(other.getChargingstationId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getGiftcertificateId() == null) ? 0 : getGiftcertificateId().hashCode());
        result = prime * result + ((getChargingstationId() == null) ? 0 : getChargingstationId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", giftcertificateId=").append(giftcertificateId);
        sb.append(", chargingstationId=").append(chargingstationId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}